package com.aier.bean.inventory;


import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

import java.time.LocalDate;
import java.util.Date;

/**
 * 商品录入表
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("product_entry")
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER)
public class ProductEntryBean {
    @ExcelProperty(value = "型号")
    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER)
    @NonNull
    @ColumnWidth(50)
    private String modelName;

    @ExcelProperty(value = "业务员")
    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER)
    @NonNull
    @ColumnWidth(15)
    private String salesperson;

    @DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = "录入时间")
    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER)
    @ColumnWidth(15)
    private LocalDate enterDate;

    @ExcelProperty(value = "操作方向")
    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER)
    @NonNull
    @ColumnWidth(15)
    private String operateType;

    @ExcelProperty(value = "录入数量")
    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER)
    @NonNull
    @ColumnWidth(15)
    private int enterQuantity;
}
